package net.zhengxinyun.performance.mapper.Indicators;

import net.zhengxinyun.performance.dto.TownIndexDTO;
import net.zhengxinyun.performance.entity.TownEntity;
import net.zhengxinyun.performance.entity.TownScoreEntity;
import net.zhengxinyun.performance.filter.TownIndicatorsFilter;
import net.zhengxinyun.performance.filter.TownScoreFilter;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface TownScoreEntityMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table inv_town_score
     *
     * @mbg.generated Thu Nov 22 22:18:15 CST 2018
     */
    int deleteByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table inv_town_score
     *
     * @mbg.generated Thu Nov 22 22:18:15 CST 2018
     */
    int insert(TownScoreEntity record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table inv_town_score
     *
     * @mbg.generated Thu Nov 22 22:18:15 CST 2018
     */
    int insertSelective(TownScoreEntity record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table inv_town_score
     *
     * @mbg.generated Thu Nov 22 22:18:15 CST 2018
     */
    TownScoreEntity selectByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table inv_town_score
     *
     * @mbg.generated Thu Nov 22 22:18:15 CST 2018
     */
    int updateByPrimaryKeySelective(TownScoreEntity record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table inv_town_score
     *
     * @mbg.generated Thu Nov 22 22:18:15 CST 2018
     */
    int updateByPrimaryKey(TownScoreEntity record);

    List<TownScoreFilter> query(TownScoreFilter filter);

    int insertEach(List<TownEntity> list);

    int updateAuditForTownId(TownScoreEntity townScoreEntity);

    int updateByIndexIdAndTownId(TownScoreEntity townScoreEntity);

    int deleteByIndexId(String indexId);

    TownScoreFilter queryForNewTime();

    List<TownScoreFilter> queryAfterImport(@Param(value = "indexId") String indexId);
    List<TownScoreFilter> queryAfterImport(@Param(value = "indexId")String indexId ,@Param(value = "townId") String townId, @Param(value = "dateTime") String datatime );

    List<TownIndicatorsFilter> getIndexScore(TownIndicatorsFilter filter);

    List<TownIndicatorsFilter> getExportIndexScore(TownIndicatorsFilter filter);
    List<TownIndexDTO>  selectIndexScore(TownScoreFilter filter);

    List<TownScoreFilter> queryDepartScore(@Param(value = "townId") String townId, @Param(value = "dateTime") String datatime);

}